
<?php $keyword = $sf_request->hasParameter('search') ? $sf_request->getParameter('search') : __('sisesta otsingusõna'); ?>
<div class="searchbox">
	<div class="searchleft">
		<img src="/project_css_js/img/searchleft.png" width="10" height="25" alt=""/>
	</div>
	<div class="searchcenter">
		<form id="search_form" method="get" action="<?php echo LinkGen::getInstance(LinkGen::STRUCTURE_ACTIONS)->link(null, array('module' => 'searchResults', 'action' => 'detailed')) ?>">
			<div class="sinput"><input class="searchin otsingin" id="searchbox" type="text" title="<?php echo __('sisesta otsingusõna') ?>" value="<?php echo $keyword ?>" name="search" maxlength="17"/></div>
			<div class="clear"></div>
		</form>
		
	</div>
	<div class="sbutton"><p><a id="otsi_button" href="#"><?php echo __('otsi') ?></a></p></div>
	<div class="searchright">
		<img src="/project_css_js/img/searchright.png" width="10" height="25" alt=""/>
	</div>
	<div class="clear"></div>
	<div id="search" class="hiddenbox" style="display:block;color:white"></div>
</div>
<script type="text/javascript">
$(document).ready(function(){
	$('#otsi_button').click(function(e){
		e.preventDefault();
		$('#search_form').submit();
		return false;
	});
	$('#searchbox').liveSearch({url: "<?php echo LinkGen::getInstance(LinkGen::STRUCTURE_ACTIONS)->link(null, array('module' => 'searchResults', 'action' => 'ajax')) ?>?search=", id: "search" });
});
</script>
<div class="clear"></div>